<?php /* Smarty version 2.6.19, created on 2009-01-02 12:17:06
         compiled from admin/admin_groupusers.tpl */ ?>
<?php echo '
<script type="text/javascript">
<!--
function confirmDelete(articleId) {'; ?>

if (confirm("This will remove <?php echo $this->_tpl_vars['userinfo']['uname']; ?>
 from the group Continue?"))
document.location = "admin.php?page=group&subpage=groupusers&action=delete&gid=<?php echo $this->_tpl_vars['groupinfo']['id']; ?>
&uid=" + articleId;<?php echo '
}
//-->
</script>
'; ?>

<h2><?php echo $this->_tpl_vars['groupinfo']['teamname']; ?>
 Users</h2>
<table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" class="table">
<tr> 
   <th width="5%" class="smallhead"></th>
  <th colspan="2" class="smallhead">User Name</th>
</tr>
<?php unset($this->_sections['groups']);
$this->_sections['groups']['name'] = 'groups';
$this->_sections['groups']['loop'] = is_array($_loop=$this->_tpl_vars['numgroupusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['groups']['show'] = true;
$this->_sections['groups']['max'] = $this->_sections['groups']['loop'];
$this->_sections['groups']['step'] = 1;
$this->_sections['groups']['start'] = $this->_sections['groups']['step'] > 0 ? 0 : $this->_sections['groups']['loop']-1;
if ($this->_sections['groups']['show']) {
    $this->_sections['groups']['total'] = $this->_sections['groups']['loop'];
    if ($this->_sections['groups']['total'] == 0)
        $this->_sections['groups']['show'] = false;
} else
    $this->_sections['groups']['total'] = 0;
if ($this->_sections['groups']['show']):

            for ($this->_sections['groups']['index'] = $this->_sections['groups']['start'], $this->_sections['groups']['iteration'] = 1;
                 $this->_sections['groups']['iteration'] <= $this->_sections['groups']['total'];
                 $this->_sections['groups']['index'] += $this->_sections['groups']['step'], $this->_sections['groups']['iteration']++):
$this->_sections['groups']['rownum'] = $this->_sections['groups']['iteration'];
$this->_sections['groups']['index_prev'] = $this->_sections['groups']['index'] - $this->_sections['groups']['step'];
$this->_sections['groups']['index_next'] = $this->_sections['groups']['index'] + $this->_sections['groups']['step'];
$this->_sections['groups']['first']      = ($this->_sections['groups']['iteration'] == 1);
$this->_sections['groups']['last']       = ($this->_sections['groups']['iteration'] == $this->_sections['groups']['total']);
?>
<tr>
<td class="text" style="text-align:center;"><?php if ($this->_tpl_vars['editallowed_page']): ?><a href="javascript:confirmDelete('<?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['id']; ?>
')" title="Remove <?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['uname']; ?>
 from <?php echo $this->_tpl_vars['groupinfo']['teamname']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete.gif"  border="0" alt="Remove <?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['uname']; ?>
 from <?php echo $this->_tpl_vars['groupinfo']['teamname']; ?>
" /></a><?php else: ?><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/delete_grey.gif" border="0" alt="Deleting Disabled" title="Deleting Disabled" /><?php endif; ?></td>
<td colspan="2" class="text" <?php if ($this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['type'] == 1): ?>style="background-color:#cdd7ff;"<?php elseif ($this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['type'] == 2): ?>style="background-color:#eeffff;"<?php endif; ?>>
	<a href="admin.php?page=users&subpage=users_view&id=<?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['uname']; ?>
</a>
	<?php if ($this->_tpl_vars['editallowed_page'] && $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['uname'] != $this->_tpl_vars['uname']): ?>
		<?php if ($this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['type'] != 0): ?>
			<a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=movedown&amp;uid=<?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['id']; ?>
&amp;gid=<?php echo $this->_tpl_vars['groupinfo']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/down.gif" border="0" alt="Up" title="Downgrade level" /></a>
		<?php else: ?>
			<img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/down_grey.gif" border="0" alt="Up" title="Already lowest level" />
		<?php endif; ?>
		<?php if ($this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['type'] != 2): ?>
			<a href="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;action=moveup&amp;uid=<?php echo $this->_tpl_vars['groupusers'][$this->_sections['groups']['index']]['id']; ?>
&amp;gid=<?php echo $this->_tpl_vars['groupinfo']['id']; ?>
"><img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/up.gif" border="0" alt="Up" title="Upgrade level" /></a>
		<?php else: ?>
			<img src="<?php echo $this->_tpl_vars['tempdir']; ?>
admin/images/up_grey.gif" border="0" alt="Up" title="Already highest level" />
		<?php endif; ?>
	<?php endif; ?>
</td>
</tr>
<?php endfor; endif; ?>
<tr>
<th class="smallhead" colspan="3">Colour Key</td>
</tr>
<tr style="padding:0px;margin:0px;">
<td colspan="3" style="padding:0px;margin:0px;height:2em">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" style="padding:0px;margin:0px;" align="center" class="table">
<tr>
<td class="text" width="33%" style="text-align:center;font-weight:bold;vertical-align:middle;">Normal User</td>
<td class="text" width="33%" style="background-color:#cdd7ff;text-align:center;font-weight:bold;vertical-align:middle;">Assistant Group Leader</td>
<td class="text" width="33%" style="background-color:#eeffff;text-align:center;font-weight:bold;vertical-align:middle;">Group Leader</td>
</tr>
</table>
</td>
</tr>
<?php if ($this->_tpl_vars['editallowed_page']): ?>
<tr>
<th class="smallhead" colspan="3">Add User to Group</td>
<tr>
<td class="text" colspan="3">
<form method="post" action="<?php echo $this->_tpl_vars['pagename']; ?>
&amp;subpage=groupusers&amp;action=add&amp;gid=<?php echo $this->_tpl_vars['groupinfo']['id']; ?>
">
<div class="field">
<label for="uid" class="label">User</label>
<div class="inputboxwrapper"><select name="uid" id="uid" class="inputbox">
<option value="0">Select user</option>
<?php unset($this->_sections['users']);
$this->_sections['users']['name'] = 'users';
$this->_sections['users']['loop'] = is_array($_loop=$this->_tpl_vars['numusers']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['users']['show'] = true;
$this->_sections['users']['max'] = $this->_sections['users']['loop'];
$this->_sections['users']['step'] = 1;
$this->_sections['users']['start'] = $this->_sections['users']['step'] > 0 ? 0 : $this->_sections['users']['loop']-1;
if ($this->_sections['users']['show']) {
    $this->_sections['users']['total'] = $this->_sections['users']['loop'];
    if ($this->_sections['users']['total'] == 0)
        $this->_sections['users']['show'] = false;
} else
    $this->_sections['users']['total'] = 0;
if ($this->_sections['users']['show']):

            for ($this->_sections['users']['index'] = $this->_sections['users']['start'], $this->_sections['users']['iteration'] = 1;
                 $this->_sections['users']['iteration'] <= $this->_sections['users']['total'];
                 $this->_sections['users']['index'] += $this->_sections['users']['step'], $this->_sections['users']['iteration']++):
$this->_sections['users']['rownum'] = $this->_sections['users']['iteration'];
$this->_sections['users']['index_prev'] = $this->_sections['users']['index'] - $this->_sections['users']['step'];
$this->_sections['users']['index_next'] = $this->_sections['users']['index'] + $this->_sections['users']['step'];
$this->_sections['users']['first']      = ($this->_sections['users']['iteration'] == 1);
$this->_sections['users']['last']       = ($this->_sections['users']['iteration'] == $this->_sections['users']['total']);
?>
<option value="<?php echo $this->_tpl_vars['users'][$this->_sections['users']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['users'][$this->_sections['users']['index']]['uname']; ?>
</option>
<?php endfor; endif; ?>
</select></div><br />
<label for="utype" class="label">Type</label>
<div class="inputboxwrapper">
<select name="utype" id="utype" class="inputbox">
<option value="0">Normal User</option>
<option value="1">Assistant Group Leader</option>
<option value="2">Group Leader</option>
</select></div><br />
</div>
<div class="submitWrapper">
<input type="submit" class="button" value="Add" name="action" id="action" />&nbsp;<input type="button" class="button" value="Back" onclick="window.location='admin.php?page=group'" /></div>
</form></td>
</tr>
<?php else: ?>
<tr>
<td colspan="3" class="text"><input type="button" class="button" value="Back" onclick="window.location='admin.php?page=group'" /></td>
</tr>
<?php endif; ?>
</table>